/** 获取 assets 下面的图片 */
export const getImageUrl = (url: string): string => {
  return new URL(`../assets/imgs/${url}`, import.meta.url).href
}
/** 字符串空格验证 */
export function validSpace(_rule: any, val: string, msg: string) {
  if (!val || !val.trim()) {
    return new Error(msg || '请输入');
  } else {
    return true;
  }
}

export default {
  getImageUrl,
  validSpace
}